import request from '@/utils/request'

export function listComplaint(query) {
  return request({
    url: '/complaint/list',
    method: 'get',
    params: query
  })
}

export function createComplaint(data) {
  return request({
    url: '/complaint/create',
    method: 'post',
    data
  })
}

export function readComplaint(query) {
  return request({
    url: '/complaint/read',
    method: 'get',
    params: query
  })
}

export function updateComplaint(data) {
  return request({
    url: '/complaint/update',
    method: 'post',
    data
  })
}

export function deleteComplaint(data) {
  return request({
    url: '/complaint/delete',
    method: 'post',
    data
  })
}
